package com.dot.config;


import com.dot.service.TasksService;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Slf4j
@Component
public class ScheduledService {
    @Autowired
    private TasksService tasksService;

    @Scheduled(cron = "0/10 * * * * ?")
    public void scheduled() throws Exception {
        tasksService.updTasks();
        log.info(new Date().toString()+"=============执行日期");


    }



}
